package rjgc.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iotlwq02.common.utils.PageUtils;
import com.iotlwq02.common.utils.Query;
import org.springframework.stereotype.Service;
import rjgc.demo.dao.CommodityDao;
import rjgc.demo.entity.CommodityEntity;
import rjgc.demo.service.CommodityService;

import java.util.Map;



@Service("commodityService")
public class CommodityServiceImpl extends ServiceImpl<CommodityDao, CommodityEntity> implements CommodityService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CommodityEntity> page = this.page(
                new Query<CommodityEntity>().getPage(params),
                new QueryWrapper<CommodityEntity>()
        );

        return new PageUtils(page);
    }

}